﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="managenews.aspx.cs" Inherits="admin_managenews" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>新闻管理</title>
    <link href="images/main.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript">
// <!CDATA[

function ChangeValue() {
    window.location="managenews.aspx?cid="+form1.parentid.value;
}

// ]]>
</script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table style="width:100%">
            <tr>
                <td>
                    <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF">
                      <tr>
                        <td colspan="5" align="left">&nbsp;请选择分类： 
                        &nbsp; 
                        <select name="parentid" id="Select1" onchange="javascript:ChangeValue()">
                          <%  
                            Function f = new Function();
                            Response.Write(f.ShowClass(1));
                             %>
                        </select>
                        </td>
                      </tr>
                      <tr>
                        <td width="10%" align="center"><b>编号</b></td>
                        <td width="53%" align="center"><b>标题</b></td>
                        <td width="12%" align="center"><b>类别</b></td>
                        <td width="13%" align="center"><b>添加时间</b></td>
                        <td width="13%" align="center"><b>操作</b></td>
                      </tr>
                      <tr>
                            <asp:DataList ID="DataList1" runat="server" Width="100%">
                              <ItemTemplate>
                            <td width="10%" align="center"><%# DataBinder.Eval(Container.DataItem,"id").ToString() %></td>
                            <td width="53%"><%# DataBinder.Eval(Container.DataItem,"title").ToString() %></td>
                            <td width="12%" align="center">
                            <a href="?cid=<%# DataBinder.Eval(Container.DataItem,"classid").ToString() %>">
                                <%# Function.GetClassNameById(Int32.Parse(DataBinder.Eval(Container.DataItem, "classid").ToString()))%>                            </a>                            </td>
                            <td width="13%" align="center"><%# Function.FormatDatetime(Convert.ToDateTime(DataBinder.Eval(Container.DataItem, "addtime").ToString()))%></td>
                            <td width="13%" align="center"><a href="updatenew.aspx?id=<%# DataBinder.Eval(Container.DataItem,"id").ToString() %>">修改</a>&nbsp;
                            <a href="delnew.aspx?id=<%# DataBinder.Eval(Container.DataItem,"id").ToString() %>">删除</a></td>
                          </ItemTemplate>
                            </asp:DataList><p style="text-align: center">
                                <asp:HyperLink ID="hylfirst" runat="server">首页</asp:HyperLink>
                                <asp:HyperLink ID="hylprev" runat="server">上一页</asp:HyperLink>
                                <asp:HyperLink ID="hylnext" runat="server">下一页</asp:HyperLink>
                                <asp:HyperLink ID="hylend" runat="server">尾页</asp:HyperLink>
                                第<asp:Label ID="lbRow" runat="server" Text="Label"></asp:Label>页， 共<asp:Label ID="lbpage"
                                    runat="server" Text="Label"></asp:Label>页，共<asp:Label ID="lbRecord" runat="server"
                                        Text="Label"></asp:Label>条记录，转到<asp:TextBox ID="txtlink" runat="server" onkeypress="checkNum()"
                                            Width="29px"></asp:TextBox>
                                页<asp:LinkButton ID="link" runat="server" OnClick="link_Click" TabIndex="1">转到</asp:LinkButton>
                            </p>
                      </tr>
                    </table></td>
            </tr>
        </table>
    
    </div>
    </form>
</body>
</html>
